Kameleon-Plus  0.3.2
Public Member Functions | Protected Member Functions | List of all members
ccmc::MAS Class Reference

TODO: Brief description of MAS class. More...

#include <ccmc/MAS.h>

Inheritance diagram for ccmc::MAS:
Inheritance graph
[legend]
Collaboration diagram for ccmc::MAS:
Collaboration graph
[legend]

Public Member Functions

 MAS ()
 
long open (const std::string &filename)
 Opens a file.
 
InterpolatorcreateNewInterpolator ()
 Returns an Interpolator object for the currently opened file.
 
const std::vector< float > *const getRPosGrid (const std::string &variable)
 
const std::vector< float > *const getRPosGrid (long variable_id)
 
std::string getRPosGridName (const std::string &variable)
 
std::string getRPosGridName (long variable)
 
const std::vector< float > *const getLatPosGrid (const std::string &variable)
 
const std::vector< float > *const getLatPosGrid (long variable_id)
 
std::string getLatPosGridName (const std::string &variable)
 
std::string getLatPosGridName (long variable_id)
 
const std::vector< float > *const getLonPosGrid (long variable_id)
 
const std::vector< float > *const getlonPosGrid (const std::string &variable)
 
std::string getLonPosGridName (const std::string &variable)
 
std::string getLonPosGridName (long variable_id)
 
bool getChangeSignFlag (std::string variable)
 
bool getChangeSignFlag (long variable_id)
 
const std::vector< std::string > getLoadedVariables ()
 Returns the list of variables that have been loaded into memory, using the loadVariable or loadVectorVariable methods.
 
virtual ~MAS ()
 
- Public Member Functions inherited from ccmc::Model
 Model ()
 
void setModelName (std::string modelName)
 Sets the model name to modelName.
 
std::string getModelName ()
 Returns the modelName of the currently selected file.
 
long loadVariable (const std::string &variable)
 Load a variable into memory.
 
long unloadVariable (const std::string &variable)
 Unload a variable from memory. This will return FileReader::OK if the variable is removed from memory, and FileReader::VARIABLE_NOT_IN_MEMORY if the variable was not already in memory.
 
long loadVariableInt (const std::string &variable)
 Loads a variable into memory.
 
std::vector< float > * getVariableFromMapRW (const std::string &variable)
 Returns a pointer to the entry in the variableData map containing the variable data.
 
std::vector< int > * getIntVariableFromMapRW (const std::string &variable)
 Returns a pointer to the entry in the variableDataInt map containing the variable data.
 
const std::vector< float > *const getVariableFromMap (const std::string &variable)
 Returns a const pointer to the entry in the variableData map containing the variable data.
 
const std::vector< int > *const getIntVariableFromMap (const std::string &variable)
 Returns a const pointer to the entry in the variableDataInt map containing the variable data.
 
void addFloatVariableToMap (const std::string &variable, std::vector< float > *variableData)
 
const std::vector< float > *const getVariableFromMap (long variable_id)
 Returns a const pointer to the entry in the variableDataByID map containing the variable data.
 
const std::vector< int > *const getIntVariableFromMap (long variable_id)
 Returns a const pointer to the entry in the variableDataIntByID map containing the variable data.
 
std::vector< float > * getVariableFromMapRW (long variable_id)
 Returns a pointer to the entry in the variableDataByID map containing the variable data.
 
std::vector< int > * getIntVariableFromMapRW (long variable_id)
 Returns a pointer to the entry in the variableDataIntByID map containing the variable data.
 
void setMissingValue (float missingValue)
 Sets the missing value to use when no valid data exists.
 
float getMissingValue ()
 Returns the missing value that will be returned when no valid data exists.
 
float getConversionFactorToSI (const std::string &variable)
 Returns the conversion factor needed to convert the interpolated value to SI units.
 
std::string getNativeUnit (const std::string &variable)
 Fetches the native units of the variable as stored in the file.
 
std::string getSIUnit (const std::string &variable)
 Returns the SI units of the specified variable.
 
int getProgress ()
 
int getBusyStatus ()
 
long close ()
 Closes the currently selected file.
 
virtual ~Model ()
 
- Public Member Functions inherited from ccmc::GeneralFileReader
 GeneralFileReader ()
 
long open (const std::string &filename)
 
std::vector< float > * getVariable (const std::string &variable)
 
std::vector< float > * getVariable (long variableID)
 
std::vector< float > * getVariable (const std::string &variable, long startIndex, long count)
 
std::vector< float > * getVariable (long variableID, long startIndex, long count)
 
float getVariableAtIndex (const std::string &variable, long index)
 
float getVariableAtIndex (long variable_id, long index)
 
std::vector< int > * getVariableInt (const std::string &variable)
 
int getVariableIntAtIndex (const std::string &variable, long index)
 
int getNumberOfGlobalAttributes ()
 
int getNumberOfVariables ()
 
int getNumberOfVariableAttributes ()
 
long getNumberOfRecords (const std::string &variable)
 
long getNumberOfRecords (long variable_id)
 
long getVariableID (const std::string &variable)
 
std::string getVariableName (long variable_id)
 
Attribute getGlobalAttribute (long i)
 
std::string getGlobalAttributeName (long attribute_id)
 
std::string getVariableAttributeName (long attribute_id)
 
Attribute getGlobalAttribute (const std::string &attribute)
 
Attribute getVariableAttribute (const std::string &variable, const std::string &attribute)
 
std::vector< std::string > getVariableAttributeNames ()
 
bool doesAttributeExist (const std::string &attribute)
 
bool doesVariableExist (const std::string &variable)
 
long close ()
 
const std::string & getCurrentFilename ()
 
 ~GeneralFileReader ()
 

Protected Member Functions

void initializeConversionFactorsToSI ()
 Initializes the conversionFactorsToSI map.
 
void initializeSIUnits ()
 Initializes the variableSIUnits map.
 
- Protected Member Functions inherited from ccmc::Model
void setBusyStatus (int busyStatus)
 
- Protected Member Functions inherited from ccmc::GeneralFileReader
void initializeGlobalAttributes ()
 
void initializeVariableAttributes ()
 
void initializeVariableIDs ()
 
void initializeVariableNames ()
 

Additional Inherited Members

- Static Public Attributes inherited from ccmc::Model
static const int BUSY =1
 
static const int OK =2
 
- Protected Types inherited from ccmc::Model
typedef boost::unordered_map
< std::string, std::vector
< float > * > 
mapStringFloat
 
typedef boost::unordered_map
< std::string, std::vector
< int > * > 
mapStringInt
 
typedef boost::unordered_map
< long, std::vector< float > * > 
mapLongFloat
 
typedef boost::unordered_map
< long, std::vector< int > * > 
mapLongInt
 
- Protected Attributes inherited from ccmc::Model
std::string modelName
 
boost::unordered_map
< std::string, float > 
conversionFactorsToSI
 
boost::unordered_map
< std::string, std::string > 
variableSIUnits
 
boost::unordered_map
< std::string, std::vector
< float > * > 
variableData
 
boost::unordered_map
< std::string, std::vector
< int > * > 
variableDataInt
 
boost::unordered_map< long,
std::vector< float > * > 
variableDataByID
 
boost::unordered_map< long,
std::vector< int > * > 
variableDataIntByID
 
std::string units_
 
float missingValue
 
int busyStatus
 
int progress
 
int variablesAdded
 

Detailed Description

TODO: Brief description of MAS class.

TODO: Full description of MAS class

Constructor & Destructor Documentation

ccmc::MAS::MAS ( )
ccmc::MAS::~MAS ( )
virtual

Member Function Documentation

Interpolator * ccmc::MAS::createNewInterpolator ( )
virtual

Returns an Interpolator object for the currently opened file.

This returns an Interpolator object that contains all the necessary local variables required to interpolate independent of any other Interpolator object. The pointer must be deleted from the calling program.

Returns
A pointer to an Interpolator object.

Implements ccmc::Model.

bool ccmc::MAS::getChangeSignFlag ( std::string  variable)
bool ccmc::MAS::getChangeSignFlag ( long  variable_id)
const std::vector< float > *const ccmc::MAS::getLatPosGrid ( const std::string &  variable)

Here is the call graph for this function:

const std::vector< float > *const ccmc::MAS::getLatPosGrid ( long  variable_id)

Here is the call graph for this function:

std::string ccmc::MAS::getLatPosGridName ( const std::string &  variable)
std::string ccmc::MAS::getLatPosGridName ( long  variable_id)
const std::vector< std::string > ccmc::MAS::getLoadedVariables ( )
virtual

Returns the list of variables that have been loaded into memory, using the loadVariable or loadVectorVariable methods.

Reimplemented from ccmc::Model.

Here is the call graph for this function:

const std::vector< float > *const ccmc::MAS::getLonPosGrid ( long  variable_id)

Here is the call graph for this function:

const std::vector< float > *const ccmc::MAS::getlonPosGrid ( const std::string &  variable)

Here is the call graph for this function:

std::string ccmc::MAS::getLonPosGridName ( const std::string &  variable)
std::string ccmc::MAS::getLonPosGridName ( long  variable_id)
const std::vector< float > *const ccmc::MAS::getRPosGrid ( const std::string &  variable)

Here is the call graph for this function:

const std::vector< float > *const ccmc::MAS::getRPosGrid ( long  variable_id)

Here is the call graph for this function:

std::string ccmc::MAS::getRPosGridName ( const std::string &  variable)
std::string ccmc::MAS::getRPosGridName ( long  variable)
void ccmc::MAS::initializeConversionFactorsToSI ( )
protectedvirtual

Initializes the conversionFactorsToSI map.

These factors are used to convert interpolated values to SI units.

Implements ccmc::Model.

void ccmc::MAS::initializeSIUnits ( )
protectedvirtual

Initializes the variableSIUnits map.

Implements ccmc::Model.

long ccmc::MAS::open ( const std::string &  filename)
virtual

Opens a file.

Opens a file and performs any necessary initialization required to work with the data.

Parameters
filename

Implements ccmc::Model.

Here is the call graph for this function:


The documentation for this class was generated from the following files: